Telegram Group & Telegram Channel
Узнаем сколько лет человеку по дате его рождения

В этом коде мы запрашиваем у пользователя его дату рождения, а затем получаем текущую дату с помощью функции time. Затем мы используем структуру tm для извлечения года, месяца и дня из текущей даты и вычисляем количество полных лет с помощью формулы now->tm_year + 1900 - year. Если текущий месяц и день меньше, чем месяц и день рождения, мы уменьшаем возраст на 1. Наконец, мы выводим результат на экран.

➡️ @cpp_geek



tg-me.com/cpp_geek/273
Create:
Last Update:

Узнаем сколько лет человеку по дате его рождения

В этом коде мы запрашиваем у пользователя его дату рождения, а затем получаем текущую дату с помощью функции time. Затем мы используем структуру tm для извлечения года, месяца и дня из текущей даты и вычисляем количество полных лет с помощью формулы now->tm_year + 1900 - year. Если текущий месяц и день меньше, чем месяц и день рождения, мы уменьшаем возраст на 1. Наконец, мы выводим результат на экран.

➡️ @cpp_geek

BY C++ geek




Share with your friend now:
tg-me.com/cpp_geek/273

View MORE
Open in Telegram


C geek Telegram | DID YOU KNOW?

Date: |

Importantly, that investor viewpoint is not new. It cycles in when conditions are right (and vice versa). It also brings the ineffective warnings of an overpriced market with it.Looking toward a good 2022 stock market, there is no apparent reason to expect these issues to change.

For some time, Mr. Durov and a few dozen staffers had no fixed headquarters, but rather traveled the world, setting up shop in one city after another, he told the Journal in 2016. The company now has its operational base in Dubai, though it says it doesn’t keep servers there.Mr. Durov maintains a yearslong friendship from his VK days with actor and tech investor Jared Leto, with whom he shares an ascetic lifestyle that eschews meat and alcohol.

C geek from pl


Telegram C++ geek
FROM USA